function OS_Battler(host,id)
{
	this.$super=OS_Resource;
	if (this.$super(host,id)===false) return;
	delete this.$super;
	
	this.normalAttackSkill=null;
	this.specialSkills=[];
	
	this.load=function(handler)
	{
		var children=this.resourceNode.childNodes;
		for (var i=0;i<children.length;i++)
		{
			if (children[i].nodeType!=1) continue;
			var child=children[i];
			switch(child.nodeName)
			{
				case "name":
					this.name=child.childNodes[0].nodeValue;
					break;
				case "bild":
					this.actor=OS_Resource.resource.get(child.childNodes[0].nodeValue);
					break;
				case "hp":
					this.maxHp=Number(child.childNodes[0].nodeValue);
					break;
				case "mp":
					this.maxMp=Number(child.childNodes[0].nodeValue);
					break;
				case "speed":
					this.speed=Number(child.childNodes[0].nodeValue);
					break;
				case "attack":
					this.attack=Number(child.childNodes[0].nodeValue);
					break;
				case "defense":
					this.defense=Number(child.childNodes[0].nodeValue);
					break;
				case "magic":
					this.magic=Number(child.childNodes[0].nodeValue);
					break;
				case "resistance":
					this.resistance=Number(child.childNodes[0].nodeValue);
					break;
				case "experience":
				    this.experience=Number(child.childNodes[0].nodeValue);
					break;
				case "abilityGroup":
					var abilityList=child.childNodes;
					for (var j=0;j<abilityList.length;j++)
					{
						if (abilityList[j].nodeType!=1) continue;
						var abilityNode=abilityList[j];
						if (abilityNode.getAttribute("type")=="normalAttack")
						{
							this.normalAttackSkill=OS_Resource.resource.get(abilityNode.childNodes[0].nodeValue);
						}
						else
						{
							this.specialSkills.push(OS_Resource.resource.get(abilityNode.childNodes[0].nodeValue));
						}
					}
					break;
			}
		}
		this.loaded=true;
		handler(this);
	}
}

OS_Resource.Builder.put("battler",OS_Battler);